<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>

	<xsl:template match="/">		

		<h1>Release Notes</h1>
		<div class="c11 nm fr">
			<h4 class="mb10">Quick links</h4>
			<ul>
				<xsl:for-each select="controls/control">
					<xsl:if test="area != 'Area'">
						<xsl:choose>
							<xsl:when test="area = 'Grid'">
								<li>
									<a title="RadGrid" href="#RadGrid">
										<xsl:value-of select="area"/>
									</a>
								</li>
							</xsl:when>
							<xsl:otherwise>
								<li>
									<a title="{area}" href="#{area}">
										<xsl:value-of select="area"/>
									</a>
								</li>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:if>
				</xsl:for-each>
			</ul>
		</div>
		<div class="c32 nm">
			<h3 class="mb-20">CHANGES</h3>
			<xsl:for-each select="controls/control">

				<xsl:if test="stories/story or bugs/bug">

					<div class="l-item">
						<xsl:variable name="header">
							<xsl:value-of select="area"/>
						</xsl:variable>

						<xsl:choose>
							<xsl:when test="area = 'Grid'">
								<h4 id="RadGrid">
									<xsl:value-of select="area"/>
								</h4>
							</xsl:when>
							<xsl:otherwise>
								<h4 id="{area}">
									<xsl:value-of select="area"/>
								</h4>
							</xsl:otherwise>
						</xsl:choose>

						<xsl:if test="stories/story">
							<h5 class="mb10">
								<span class="label green after">New</span>
							</h5>
							<ul class="mb30">
								<xsl:for-each select="stories/story">
									<li>
										<xsl:value-of select="."/>
									</li>
								</xsl:for-each>
							</ul>
						</xsl:if>

						<xsl:if test="bugs/bug">
							<h5 class="mb10">
								<span class="label after">Fixed</span>
							</h5>
							<ul class="mb30">
								<xsl:for-each select="bugs/bug">
									<li>
										<xsl:value-of select="."/>
									</li>
								</xsl:for-each>
							</ul>
						</xsl:if>

					</div>

				</xsl:if>
			</xsl:for-each>

		</div>
		>
	</xsl:template>
</xsl:stylesheet>